/*
----------------------------------------------------------------------------------------------------
This source file is part of the Senbotsu Project
Copyright (c) 2007 by Ryan Holcombe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
----------------------------------------------------------------------------------------------------
*/

#ifndef _goEntity_h
#define _goEntity_h

#include <Ogre.h>
#include <Gamut.h>
#include <iostream>
#include <map>


/**
	Defines a non-animated model and a scene node
*/

//! index of bone names to their position in the mask
typedef std::map<std::string, size_t> IndexMap;

class goEntity : public Gamut::IGameObject
{
	protected:
		Ogre::Entity *mEntity;
		Ogre::SceneNode *mNode;
		IndexMap mIndexMap;

	public:

		/** Default Constructor
		*/
		goEntity();


		/**
			\brief called when the game object is added to the manager
		*/
		virtual void onAdd() { }


		/**
			\brief called when the game object is removed from the manager
		*/
		virtual void onDestroy() { }


		/**
			\brief called each frame by the game object manager
		*/
		virtual void tick(double elapsed);


		/**
			\brief loads the mesh and skeleton
			\param[in] file mesh file name, skeleton, if found, will be loaded as well
			\param[in] pSceneMgr pointer to the ogre scene manager
		*/
		virtual void load(const std::string& file, Ogre::SceneManager *pSceneMgr);
};

#endif
